<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<script type="text/javascript" src="<?php echo ROOT; ?>static/javascript/jquery/jquery-1.7.1.min.js"></script>
<title>采集线程</title>
<?php
if($init) {
?>
<meta http-equiv='Refresh' content='<?php echo $init;?>; url=<?php echo UA("tool/collection/cthread", "id={$node['id']}")?>'>
<script type="text/javascript">
setTimeout(function() {
	$('#p').html("努力采集中... [<a href=\"javascript:location='about:blank';\">停止</a>]");
}, <?php echo ($init -1) * 1000;?>)
</script>
<?php
} 
elseif(isset($urls) && !empty($urls)) {
?>
<meta http-equiv='Refresh' content='<?=$node['col_sleep']?>; url=<?php echo UA("tool/collection/cthread", "id={$node['id']}")?>'>
<script type="text/javascript">
window.onload = function() {
	parent.calColNum(<?php echo count($urls);?>);
}
function stop() {
	location='about:blank';
}
</script>
<?php
}
?>
<style> * {font-size:12px;}</style>
</head>

<body>

<?php
if($init) {
?>
<p id="p">准备启动...</p>
<?php
}
elseif(isset($urls)) {
	if(!empty($urls)) {
?>
<p>
努力采集中... [<a href="javascript:stop();">停止</a>]
</p>
<?php } else { ?>
<p>完成</p>
<?php 
	}
}
?>

</body>
</html>